//calligraphy.js
//书画馆
//获取应用实例
const app = getApp()

Page({
  data: {
    stonegoodslist: [],
  },

  onLoad: function(options) {
    var self = this;
    console.log(options);
    wx.request({
      url: app.serverUrl + 'Abouttwo/showMugoodslist?stonetypeid=3',
      method: 'POST',
      header: {
        "Content-Type": "application/x-www-form-urlencoded"
      },
      data: {
        openid: app.openid,
        stonetypeid: options.stonetypeid
      },
      success: function(res) {
        self.setData({
          stonegoodslist: res.data.data,
        })
        // console.log(res.data.data[0])
      },
    })
  },
  mustgoodsdetils: function(res) {
    var self = this;
    console.log(res);
    var url = res.currentTarget.dataset.url;
    var stoneid = res.currentTarget.dataset.stoneid;
    wx.navigateTo({
      url: url + '?=' + stoneid,
    })
  },
  goscgxq: function(res) {
    console.log(res);
    var self = this;
    var informationid = '0';
    var id = res.currentTarget.dataset.stoneid;
    wx.navigateTo({
      url: '/pages/scgxq/scgxq?id=' + id + '&informationid=' + informationid,
    })
  }

})